<?=$this->Style()->IncludeStyleFile(array(
											'js' => 'ckfinder',
									), false, false, false);?>
<script type="text/javascript">
function SetFileField_<?=$this->fieldId;?>( fileUrl )
{
  $('#filef_<?=$this->fieldId;?>').val(fileUrl);
}

$(document).ready(
  function()
  {
	$("#button_<?=$this->fieldId;?>").click(
		function(e)
		{
			var finder = new CKFinder();
			finder.basePath = '<?=_FILEMANAGER_URL;?>';
			finder.selectActionFunction = SetFileField_<?=$this->fieldId;?>;
			finder.popup();
		}
	);
  }
);
</script>
<input type="text" class="input inp_background" id="filef_<?=$this->fieldId;?>" name="<?=$this->fieldName;?>[file]" value="<?=htmlspecialchars($this->data['file']);?>" readonly>
<input type="button" id="button_<?=$this->fieldId;?>" value="<?php echo Mozg_Lang::_('CHOOSE'); ?>" class="bt" /><br />
<input type="checkbox" name="<?=$this->fieldName;?>[repeat_x]" value="1"<?=($this->data['repeat_x'] ? ' checked' : '');?>> <?php echo Mozg_Lang::_('REPEAT_X'); ?><br />
<input type="checkbox" name="<?=$this->fieldName;?>[repeat_y]" value="1"<?=($this->data['repeat_y'] ? ' checked' : '');?>> <?php echo Mozg_Lang::_('REPEAT_Y'); ?>